<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }

        body {
            /* height: 100vh; */
            background-color: #FFCCCC;
        }

        .main {

            position: relative;
            background-color: #CCCCFF;
            width: 80%;
            top: 100px;
            left: 50%;
            transform: translate(-50%, 0);
            padding: 5px;
        }

        .par {
            display: flex;
        }

        .test {
            margin: 5px;
            background-color: #CCFFCC;
            height: 200px;
            flex: 1;
        }

        .child1 {
            margin: 5px;
            background-color: #CCFFCC;
            height: 200px;
            flex: 0 0 50%;
        }

        .child2 {
            margin: 5px;
            background-color: #CCFFCC;
            height: 200px;
            flex: 0 0 33.3333%;
        }

        .child3 {
            margin: 5px;
            background-color: #CCFFCC;
            height: 200px;
            flex: 0 0 20%;
        }


        /*粉#FFCCCC 紫#CCCCFF 绿#CCFFCC */
    </style>
</head>

<body>
    <div class="main">
        <div class="par">
            <div class="test">自动均分</div>
            <div class="test">自动均分</div>
            <div class="child1">设定占据50%</div>
        </div>
        <div class="par">
            <div class="test">自动均分</div>
            <div class="test">自动均分</div>
            <div class="child2">设定占据33.3333%</div>
        </div>
        <div class="par">
            <div class="test">自动均分</div>
            <div class="child3">设定占据20%</div>
            <div class="test">自动均分</div>
            <div class="child3">设定占据20%</div>
        </div>
    </div>

</body>

</html>